package com.jimikongjian.models;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import java.sql.Timestamp;

/**
 * Created by fuxiuyang on 17/2/19.
 * 记录用户加入空间申请的表格
 */
@Scope("prototype")
@Repository("applicationInfo")
public class ApplicationInfo {

    /**ApplicationInfoService
     * 初始化id
     */
    public static final int INIT_ID = -1;

    /**
     * 表示该申请消息未读
     */
    public static final int STATUS_UNREADED = 0;

    /**
     * 表示该申请消息已读
     */
    public static final int STATUS_READED = 1;

    /**
     * 表示拒绝该用户的申请
     */
    public static final int TYPE_REFUSE = -1;

    /**
     * 表示该申请未做任何处理
     */
    public static final int TYPE_UNKNOW = 0;

    /**
     * 表示同意该申请消息
     */
    public static final int TYPE_PASS = 1;

    /**
     * 自身的id号
     */
    private int id = ApplicationInfo.INIT_ID;

    /**
     * 申请者的id号
     */
    private int applicatorId = ApplicationInfo.INIT_ID;

    /**
     * 申请者的昵称
     */
    private String applicatorNick;

    /**
     * 申请者的头像
     */
    private String applicatorAvatar;

    /**
     * 申请理由
     */
    private String content;

    /**
     * 申请空间的id号
     */
    private int roomId = ApplicationInfo.INIT_ID;

    /**
     * 空间的名称
     */
    private String roomName;

    /**
     * 审批者的id号
     */
    private int roomCreator = ApplicationInfo.INIT_ID;

    /**
     * 查看状态
     * 0：表示未查看
     * 1：表示已经查看
     */
        private int status = ApplicationInfo.STATUS_UNREADED;

    /**
     * 审批的状态
     * -1：表示拒绝
     * 0：表示未处理
     * 1：表示同意
     */
    private int type = ApplicationInfo.TYPE_UNKNOW;

    /**
     * 未读申请消息条数
     */
    private int unreadCount = 0;

    /**
     * 申请时间
     */
    private Timestamp createTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getApplicatorId() {
        return applicatorId;
    }

    public void setApplicatorId(int applicatorId) {
        this.applicatorId = applicatorId;
    }

    public String getApplicatorNick() {
        return applicatorNick;
    }

    public void setApplicatorNick(String applicatorNick) {
        this.applicatorNick = applicatorNick;
    }

    public String getApplicatorAvatar() {
        return applicatorAvatar;
    }

    public void setApplicatorAvatar(String applicatorAvatar) {
        this.applicatorAvatar = applicatorAvatar;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getRoomId() {
        return roomId;
    }

    public void setRoomId(int roomId) {
        this.roomId = roomId;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public int getRoomCreator() {
        return roomCreator;
    }

    public void setRoomCreator(int roomCreator) {
        this.roomCreator = roomCreator;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getUnreadCount() {
        return unreadCount;
    }

    public void setUnreadCount(int unreadCount) {
        this.unreadCount = unreadCount;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
}
